<template>
    <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in news" :key="item.id">
					<router-link :to="'/news&'+item.id">
						<img class="mui-media-object mui-pull-left" :src="item.img">
						<div class="mui-media-body">
							{{item.title}}
							<p class='mui-ellipsis'><span>发表时间：2020.1.28</span><span>点击次数：{{item.count}}</span></p>
						</div>
					</router-link>
				</li>
	</ul>
</template>

<script>
export default {
    data(){
        return {
            news:[]
        }
    },
    methods:{
        getNews(){
            this.$http.get("http://news.com").then(result=>{
              this.news = result.body.data
            })
            
        }
    },
    created(){
        this.getNews()
    }
}
</script>

<style scoped>
 .mui-ellipsis{
     color: #26a2ff;
     display: flex;
     justify-content: space-between;
     font-size: 12px
 }

</style>